<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
  </style>
</head>

<body>

  <svg width="500" height="500" style="background: #efefef;">

    <!-- <rect x="20" y="50" width="100" height="50" stroke='red' stroke-width="5px" style="
    fill: blue; " /> -->

    <!-- <circle cx="100" fill="red" cy="100" r="40" style="
    stroke: blue; stroke-width: 2px;
    " /> -->

    <!-- <ellipse cx="100" cy="100" rx="40" ry="20" style="
    stroke: blue; stroke-width: 2px;
    " /> -->

    <!-- <line x1="20" y1="20" x2="150" y2="250" stroke="blue" stroke-width="2px" /> -->

    <!-- <polygon stroke="blue" fill="none" stroke-width="2px" points="10,10 50,50 120,200 300,40" style="" /> -->

    <!-- <polyline stroke="blue" fill="red" stroke-width="2px" points="10,10 50,50 120,200 300,40" style="" /> -->


    <!-- <path d="M50,50 L120,130 L200,300" fill="none" stroke="blue" stroke-width="5px" /> -->


    <!-- <text x="10" y="80" style="font-size:50px; 
    fill:none; stroke:red;stroke-width: 1px;"> hello world </text> -->

    <defs>
      <g id="group">

        <rect x="10" y="10" width="100" height="50" fill="blue">
          <animate attributeName="opacity" from="1" to="0" dur="5s" repeatCount="indefinite" />
          <animate attributeName="x" from="10" to="100" dur="5s" repeatCount="indefinite" />
        </rect>

        <circle cx="100" cy="100" r="20" style="stroke:red;stroke-width: 1px;" />


      </g>
    </defs>

    <use xlink:href="#group" x="50" y="50" />

    <use xlink:href="#group" x="150" y="150" />


  </svg>


</body>

</html>